package com.develop.web.in.service;

//不同产品有不同的实现，不同的计算分期的方式

import com.develop.data.loan.manager.L0001B0001LoanRepaymentPlanManager;
import com.develop.data.loan.manager.api.LoanRepaymentPlanManager;
import com.develop.data.loan.model.LoanContract;
import com.develop.data.loan.model.LoanInstallment;
import com.develop.web.in.service.api.LoanRepaymentPlanPreviewService;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class L0001B0001LoanRepaymentPlanService implements LoanRepaymentPlanPreviewService<LoanContract, LoanInstallment> {

    @Override
    public List<LoanInstallment> preview(LoanContract loanContract) {
        LoanRepaymentPlanManager loanContractBankXManager = new L0001B0001LoanRepaymentPlanManager(loanContract);
        return loanContractBankXManager.getRepaymentPlan();
    }

    @Override
    public List<List<LoanInstallment>> batchPreview(List<LoanContract> loanContracts) {
        return null;
    }
}
